package com.n9.qqonline.sales.product;

import java.util.Objects;

/**
 * @author ice
 * @since 2019/3/19 10:29
 */
public class Patent {

    /**
     * 领域标签
     */
    private String tags;
    /**
     * 专利号
     */
    private String no;
    /**
     * 专利名称
     */
    private String name;
    /**
     * 专利状态
     */
    private String status;
    /**
     * 缴费截至日期
     */
    private String expireDay;
    /**
     * 销售状态
     */
    private String saleStatus;
    /**
     * 备注
     */
    private String notes;

    /**
     * 优先级
     */
    private Integer priority;

    public Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getExpireDay() {
        return expireDay;
    }

    public void setExpireDay(String expireDay) {
        this.expireDay = expireDay;
    }

    public String getSaleStatus() {
        return saleStatus;
    }

    public void setSaleStatus(String saleStatus) {
        this.saleStatus = saleStatus;
    }

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    public boolean isSoldOut() {
        return Objects.equals("预留", this.saleStatus);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) { return true ;}
        if (o == null || getClass() != o.getClass()){ return false;}
        Patent patent = (Patent) o;
        return Objects.equals(no, patent.no);
    }

    @Override
    public int hashCode() {
        return Objects.hash(no);
    }
}
